package org.typedtree

/**
 * @author bweber
 * @version $Rev$, $Date$
 */

import eclipse.jetty.websocket.{WebSocket, WebSocketServlet}
import javax.servlet.http.{HttpServletRequest => HSReq, HttpServletResponse => HSResp}
class TypedTreeServlet extends WebSocketServlet
{
  override def doWebSocketConnect(req:HSReq,str:String):WebSocket = {
    val typedTreeFile = getServletConfig().getInitParameter("typedTreeFile")
    new TypedTreeWebSocket(typedTreeFile)
  }
  
  override def doGet(req : HSReq, resp : HSResp) =
    getServletContext().getNamedDispatcher("default").forward(req,resp);
}